from functional import seq

my_list = ['lizikun', '123']

# way1 第一个参数传入lambda匿名函数
result = filter(lambda x: x.isdigit(), my_list)
for record in result:
    print(record)


def is_digit(x):
    if x.isdigit():
        return x


# way2第一个函数传入函数引用
result = filter(is_digit, my_list)
for record in result:
    print(record)

result = seq(my_list).filter(lambda x: x.isdigit()).to_list()
print(result)
